home *** CD-ROM | disk | FTP | other *** search
/ The CICA Windows Explosion! / The CICA Windows Explosion! - Disc 2.iso / nt / lkbackup.zip / ntdirent.h < prev    next >
C/C++ Source or Header  |  1993-09-25  |  1KB  |  55 lines

  1. /* Unix compatible directory functions for Windows NT
  2.  * Patched together code from the NT port of Perl done by 
  3.  * Clark Williams of Intergraph Corp. with the header file
  4.  * from the Microsoft Windows NT SDK Posix subsystem.
  5. */
  6.  
  7. /*
  8.  * $Id: $
  9.  */
  10.  
  11. /*
  12.  * $Log: $
  13.  */
  14.  
  15. #ifndef NTDIRENT
  16. #define NTDIRENT
  17.  
  18. #include <sys/types.h>
  19. #include <limits.h>
  20.  
  21. #ifdef __cplusplus
  22. extern "C" {
  23. #endif
  24.  
  25. #define NAME_MAX 255
  26.  
  27. struct dirent    {
  28.     ino_t    d_ino;                    /* inode number (not used by MS-DOS) */
  29.     int    d_namlen;                    /* Name length */
  30.     char    d_name[NAME_MAX+1];        /* file name */
  31. };
  32.  
  33.  
  34. typedef struct DIR {
  35.     char *start;            /* Starting position */
  36.     char *curr;            /* Current position */
  37.     long size;            /* Size of string table */
  38.     long nfiles;            /* number if filenames in table */
  39.     struct dirent dirstr;        /* Directory structure to return */
  40. } DIR;
  41.  
  42.  
  43. DIR *cdecl opendir(const char *);
  44. struct dirent *readdir(DIR *);
  45. long telldir(DIR *dirp);
  46. void seekdir(DIR *dirp,long loc);
  47. void rewinddir(DIR *);
  48. void closedir(DIR *);
  49.  
  50. #ifdef __cplusplus
  51. }
  52. #endif
  53.  
  54. #endif /* NTDIRENT_H */
  55.